package com.zheng.PointTest.controller;

import com.zheng.PointTest.base.response.BaseResponse;
import com.zheng.PointTest.base.response.ResponseResult;
import com.zheng.PointTest.entity.createorder.companion;
import com.zheng.PointTest.entity.createorder.companion_hospitals;
import com.zheng.PointTest.entity.createorder.return_companion_type;
import com.zheng.PointTest.entity.createorder.service;
import com.zheng.PointTest.mapper.CreateOrderMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 类描述:[待重命名]
 * 说明:
 *
 * @author: zjl
 * @Date: 2025/5/29 17:12
 */

@BaseResponse
@RestController
@RequestMapping("order")
public class CreateOrderController {
    @Resource
    CreateOrderMapper orderMapper;
    @GetMapping("/myorder")
    public ResponseResult getOrderInfo(){
        List<companion_hospitals> companionHospitals = orderMapper.queryAllHospital();
        return_companion_type returnCompanionType = new return_companion_type();
        List<companion> companion = new ArrayList<>();
        returnCompanionType.setCompanion(companion);
        returnCompanionType.setHospitals(companionHospitals);
        service service = new service();
        returnCompanionType.setService(service);

        return new ResponseResult(0,"success",returnCompanionType);
    }
}

